﻿using System.Web;
using System.Web.Routing;
using Crow.Library.Host.Controllers;

namespace Crow.Library.Host.AspNet.Handlers
{
    public class CrowRouteHandler : IRouteHandler
    {
        private readonly BusinessInvoker _Handler;

        public CrowRouteHandler(BusinessInvoker handler)
        {
            _Handler = handler;
        }

        #region IRouteHandler Members

        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            return new CrowBusinessAsyncHandler(_Handler);
        }

        #endregion
    }
}